package cn.wolfcode.luowowo.search.template;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.List;

/**
 * @author win
 */
@Setter
@Getter
@Document(indexName = "luowowo_hotel", type = "hotel")
public class HotelTemplate implements Serializable {

    public static final String INDEX_NAME = "luowowo_hotel";
    public static final String TYPE_NAME = "hotel";

    /**
     * 酒店的编号
     */
    @Id
    @Field(store = true, index = true, type = FieldType.Long)
    private Long id;

    /**
     * 酒店的名字
     */
    @Field(index = true, analyzer = "ik_max_word", store = true, searchAnalyzer = "ik_max_word", type = FieldType.Text)
    private String hotelName;

    /**
     * 酒店说明
     */
    @Field(index = true, analyzer = "ik_max_word", store = true, searchAnalyzer = "ik_max_word", type = FieldType.Text)
    private String hotelInfo;

    /**
     * 酒店的价格
     */
    @Field(store = true, index = true, type = FieldType.Double)
    private Double price;

    /**
     * 酒店图片
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String imgUrl;

    /**
     * 酒店评分
     */
    @Field(store = true, index = true, type = FieldType.Keyword)
    private String score;

    /**
     * 酒店地址
     */
    @Field(index = true, analyzer = "ik_max_word", store = true, searchAnalyzer = "ik_max_word", type = FieldType.Text)
    private String address;

    /**
     * 酒店的主题名称
     */
    @Field(store = true, index = true, type = FieldType.Keyword)
    private String themeName;

    /**
     * 酒店主题编号
     */
    @Field(store = true, index = true, type = FieldType.Long)
    private Long themeId;

    /**
     * 酒店所在的目的地编号
     */
    @Field(store = true, index = true, type = FieldType.Long)
    private Long destId;

    /**
     * 酒店所在目的的名称
     */
    @Field(store = true, index = true, type = FieldType.Keyword)
    private String destName;
}
